home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / tbfence1.zip / CONVERT.BAT < prev    next >
DOS Batch File  |  1993-08-25  |  2KB  |  85 lines

  1. @echo off
  2.  
  3. rem     Sample batch file to automatically scan a diskette for viruses
  4. rem     and convert it to TbFence format.
  5.  
  6. rem     This batch file uses our virus scanner TbScan to check a diskette
  7. rem     before allowing the converstion to take place.
  8. rem     TbScan is distributed worldwide on Bulletin Board Systems in an
  9. rem     archive named TBAV???.ZIP. Of cours you can also contact us if
  10. rem     you want an evaluation sample.
  11.  
  12. :start
  13. echo.
  14. echo Put a diskette into drive A:
  15. pause
  16.  
  17. tbfence query a:
  18. if errorlevel 10 goto read_err
  19. if errorlevel 2 goto start
  20.  
  21. tbscan a: nomem batch log ll=0
  22. cls
  23. if errorlevel 255 goto bigtrouble
  24. if errorlevel 5 goto infected
  25. if errorlevel 4 goto probably
  26. if errorlevel 3 goto changed
  27. if errorlevel 2 goto read_err
  28.  
  29. echo TbScan has checked the diskette and is quite sure that it does not
  30. echo contain a virus.
  31. echo.
  32. tbfence encrypt a:
  33. echo.
  34. if errorlevel 255 goto notbfence
  35. if errorlevel 11 goto write_err
  36. if errorlevel 10 goto read_err
  37. echo The diskette is now ready for use on TbFence machines!
  38. echo If you do not want to convert another diskette, press Ctrl-C
  39. echo Remove the diskette...
  40. pause
  41. goto start
  42.  
  43. :read_err
  44. goto start
  45.  
  46. :write_err
  47. echo It is not possible to write to the diskette in drive A:
  48. echo Please make sure the write protect tab is in the right position!
  49. goto start
  50.  
  51. :bigtrouble
  52. echo The sanity check of TbScan failed! This indicates that TbScan is
  53. echo very probably infected. This is NOT caused by the diskette in
  54. echo drive A:, but this means that your system was already infected!
  55. echo Please power down the machine and consult a virus expert!
  56. :loop
  57. goto loop
  58.  
  59. :infected
  60. echo The diskette contains one or more viruses!
  61. echo.
  62. if exist tbscan.log type tbscan.log
  63. pause
  64. goto start
  65.  
  66. :probably
  67. echo The diskette probably contains one or more viruses!
  68. echo Please check if the results listed below can be explained.
  69. echo If this is not the case, the diskette probably contains a virus!
  70. echo.
  71. if exist tbscan.log type tbscan.log
  72. pause
  73. goto start
  74.  
  75. :changed
  76. echo A TBAV checksum file was found on the diskette, but the checksum
  77. echo information did not match the actual file information. The files
  78. echo on the diskette have been changed afterwards. Please find out what
  79. echo happened!
  80. pause
  81. goto start
  82.  
  83. :notbfence
  84.  
  85.